# -*- coding: utf-8 -*-
"""
Module Description:
Date: 2021/03/09
Author: chenmurong
"""
from pyshare.utils.time_utils import getCT
from pyshare.const.enums.item import ItemTimeType


class ItemMixin(object):

    is_time_limit = NotImplemented
    expire_time = NotImplemented

    @property
    def is_expire(self):
        """是否过期"""
        if self.is_time_limit == ItemTimeType.TimeLimit and getCT() > self.expire_time:
            return True
        return False
